package com.ethink.warehouse.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.MateProduceCodeInfo;
import com.ethink.warehouse.api.request.MateProduceCodeAddRequest;
import com.ethink.warehouse.api.request.MateProduceCodeQueryRequest;
import com.ethink.warehouse.api.request.MateProduceCodeUpdateRequest;
import com.ethink.warehouse.api.response.MateProduceCodeAddResponse;
import com.ethink.warehouse.api.response.MateProduceCodeDeleteResponse;
import com.ethink.warehouse.api.response.MateProduceCodeUpdateResponse;
import java.util.List;

/**
 * 商品生产批次号 Facade接口
 *
 * @author default
 * @date 2022-11-22
 */
@FeignClient(name = "ethink-warehouse-service", path = "warehouse-service/facade/v1/mateProduceCode", contextId = "mateProduceCodeFacade")
public interface MateProduceCodeFacade {

    @PostMapping("/queryMateProduceCode")
    @ResponseBody
    Page<MateProduceCodeInfo> queryMateProduceCode(@RequestBody MateProduceCodeQueryRequest request);

    @PostMapping("/getMateProduceCodeById")
    @ResponseBody
    MateProduceCodeInfo getMateProduceCodeById(@RequestParam("mateProduceCodeId") Long mateProduceCodeId);

    @PostMapping("/listMateProduceCode")
    @ResponseBody
    List<MateProduceCodeInfo> listMateProduceCode(@RequestBody MateProduceCodeQueryRequest request);

    @PostMapping("/addMateProduceCode")
    @ResponseBody
    MateProduceCodeAddResponse addMateProduceCode(@RequestBody MateProduceCodeAddRequest request);

    @PostMapping("/updateMateProduceCode")
    @ResponseBody
    MateProduceCodeUpdateResponse updateMateProduceCode(@RequestBody MateProduceCodeUpdateRequest request);

    @PostMapping("/deleteMateProduceCode")
    @ResponseBody
    MateProduceCodeDeleteResponse deleteMateProduceCode(@RequestParam("mateProduceCodeId") Long mateProduceCodeId);

    @PostMapping("/skuAndProduceCodeUnionQuery")
    @ResponseBody
    List<MateProduceCodeInfo> skuAndProduceCodeUnionQuery(@RequestBody List<MateProduceCodeQueryRequest> requestList);
}